Accessible Python Executable Builder
by Nathan Tech
A graphical tool for turning Python programs into distributable Windows applications with Nuitka or PyInstaller.
Requirements
The builder itself is supplied as a Windows executable. Python is still required for compiling your project. Select either a normal Python installation or a virtual environment containing the packages used by your program.
Depending on the selected build method, the chosen Python environment should contain:
- Nuitka when using the Nuitka builder.
- PyInstaller when using the PyInstaller builder.
- Cython only when the Cython pre-build option is enabled.
- All packages imported by the program being compiled.
Getting started
- Run the supplied builder executable.
- Select Nuitka or PyInstaller.
- Choose the Python executable or select a virtual environment.
- Choose the main Python script for the application.
- Choose an output directory.
- Review the remaining settings and add any required packages, modules, or data files.
- Open Command and Output to review the generated command.
- Select Run Build.
Program tabs
General
Select the builder, Python environment, source script, output directory, output name, icon, build mode, console behaviour, and general build options.
Packages
Add complete Python packages that should be collected with the application. The package checker verifies packages against the currently selected Python environment.
Modules
Add individual imports that must be forced into the build, or exclude imports that should not be packaged.
Data Files
Add files and folders such as configuration files, templates, sounds, images, databases, and other resources required while the application is running.
Cython
Optionally compile selected .py or .pyx modules with Cython
before packaging the application.
Command and Output
Review the command that will be executed, start or stop a build, and read the complete build log.
Recommended workflow
- Build the project once with only the basic General settings.
- Run the resulting application and note any missing imports or files.
- Add complete third-party packages on the Packages tab when appropriate.
- Add a specific import on the Modules tab only when automatic detection misses it.
- Add runtime resources on the Data Files tab.
- Use excluded modules only when a dependency is unnecessary or causes a build problem.
- Save the finished configuration so the build can be reproduced later.
Nuitka and PyInstaller
| Builder | Best suited to | Notes |
|---|---|---|
| Nuitka | Compiled applications, performance-sensitive projects, and stronger source-code transformation. | May require a compatible C compiler and may take longer to build. |
| PyInstaller | Fast packaging, broad compatibility, and projects that need a straightforward executable bundle. | Usually faster to configure and build. |
One file
Produces a single distributable executable. Startup can be slower because bundled files may need to be unpacked temporarily.
One directory
Produces an executable together with supporting files in one folder. This is often easier to diagnose and may start faster.
Console window
Disable the console window for graphical applications. Keep it enabled while diagnosing command-line programs or startup errors.
Packages and modules
Packages
Use the Packages tab for an entire package such as requests,
numpy, or wx. This is useful when the package contains plugins,
data files, or imports that are difficult for a builder to discover automatically.
Included modules
Use an included module for a specific dynamically imported module, such as
package.submodule. Do not add every normal import manually; both builders
already detect most imports.
Excluded modules
Exclude a module only when it is optional, unwanted, incompatible, or unnecessarily increases the size of the application. Excluding a required module will break the resulting program.
Data files
Data files are files used by the application that are not Python modules. Common examples include:
- Images, icons, sounds, and fonts.
- JSON, YAML, INI, TOML, XML, or CSV files.
- HTML templates and other application resources.
- Database files and default configuration folders.
Each item has a source path and a destination inside the packaged application. Keep the destination relative rather than using an absolute drive path.
Cython pre-build
Cython support is optional. When enabled, selected Python or PYX modules are compiled before the normal Nuitka or PyInstaller step.
Use this for modules that benefit from compilation or for projects already designed to use Cython. It is not normally necessary for a basic executable build.
Configurations and BAT files
Save and load configuration
Configuration files store the selected paths, build options, packages, modules, data files, and Cython sources. Save a configuration after completing a successful build so it can be repeated or adjusted later.
Save BAT
The BAT option creates a Windows batch file containing the generated build commands. This can be used to repeat a build outside the graphical program.
Keep the BAT file with any related configuration or source project files. Paths recorded in the file may need updating if the project is moved.
Keyboard shortcuts
| Shortcut | Action |
|---|---|
| Alt + 1 | General tab |
| Alt + 2 | Packages tab |
| Alt + 3 | Modules tab |
| Alt + 4 | Data Files tab |
| Alt + 5 | Cython tab |
| Alt + 6 | Command and Output tab |
| Ctrl + R | Run the build |
| Ctrl + S | Save the generated BAT file |
| Ctrl + K | Stop the current build |
| Delete | Remove the selected item from supported lists |
Languages
The program includes English, Turkish, French, Ukrainian, and Spanish. It normally follows the Windows language setting automatically.
The supplied locale folder must remain beside the executable:
Application Folder
├── AccessiblePythonExecutableBuilder.exe
├── README.html
└── locale
├── tr
├── fr
├── uk
└── es
If the locale folder is missing or a translation cannot be loaded, the program uses English.
Troubleshooting
The builder is not installed
Install Nuitka or PyInstaller into the exact Python environment selected in the General tab. Installing it into a different Python installation will not make it available to the selected environment.
A package or module is reported as missing
Confirm that the correct Python executable or virtual environment is selected. Then install the missing dependency into that environment.
The build succeeds, but the program fails to start
- Temporarily enable the console window.
- Build in one-directory mode.
- Run the executable from a Command Prompt to view the error.
- Add any missing dynamic imports on the Modules tab.
- Add missing runtime resources on the Data Files tab.
The icon is not applied
Use a valid .ico file for Windows builds. Other image formats may not work
consistently with every builder or Windows version.
The output filename is rejected
Enter only the application name, not a complete directory path. Choose the destination folder separately with the Output directory setting.
The application is unexpectedly large
Large scientific, graphical, or multimedia packages can add many dependencies. Review collected packages and data files, and exclude only modules that are known to be optional.
The executable is flagged by security software
Newly created or unsigned executables can occasionally trigger warnings. Build from trusted source code, scan the result, and consider code signing before distributing the application.